//
//  NSMutableArray+DeepCopy.m
//  NOAHWM
//
//  Created by Ryan on 13-6-15.
//  Copyright (c) 2013年 Ryan. All rights reserved.
//

#import "NSMutableArray+DeepCopy.h"

@implementation NSMutableArray (DeepCopy)

- (NSMutableArray *)deepCopy
{
    NSMutableArray *array = [NSMutableArray array];
    for(id obj in self)
    {
        if ([obj conformsToProtocol:@protocol(NSCopying)])
            [array addObject:[[obj copy] autorelease]];
        else
        {
            [array addObject:obj];
        }
    }
    return array;
}

@end
